﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Data;

public class AcctManagers
{
    DataView _dvAcctManagers;
    public AcctManagers()
    {
        //_dvAcctManagers = (DataView)HttpContext.Current.Application["AcctManagers"];
    }

    public DataView PropertiesList(string psAcctMgr)
    {
            Properties dvProperties = new Properties();

            return dvProperties.ByAcctMgr(psAcctMgr);
    }

    public DataView Menu
    {
        get
        {
            _dvAcctManagers = (new Menus()).dvACC_DATA("Manager");
            _dvAcctManagers.RowFilter = "LVL=2";
            _dvAcctManagers.Sort = "TXT";

            return _dvAcctManagers;
            //throw new System.NotImplementedException();
        }
    }
}

public class GenlManagers
{

    DataView _dvGenlManagers;
    public GenlManagers()
    {
        //_dvGenlManagers = (DataView)HttpContext.Current.Application["GenlManagers"];
    }

    public DataView PropertiesList(string psGenMgr)
    {
        Properties dvProperties = new Properties();

        return dvProperties.ByGenMgr(psGenMgr);
    }

    public DataView Menu
    {
        get
        {
            throw new System.NotImplementedException();
        }
        set
        {
        }
    }
}

public class AreaManagers
{
    DataView _dvAreaManagers;
    public AreaManagers()
    {
        //_dvAreaManagers = (DataView)HttpContext.Current.Application["AreaManagers"];
    }

    public DataView PropertiesList(string psAreaMgr)
    {
        Properties dvProperties = new Properties();

        return dvProperties.ByAreaMgr(psAreaMgr);
    }

    public DataView Menu
    {
        get
        {
            _dvAreaManagers = (new Menus()).dvACC_DATA("Manager");
            _dvAreaManagers.RowFilter = "LVL=1";
            _dvAreaManagers.Sort = "TXT";

            return _dvAreaManagers;
        }
    }
}
